package com.cskaoyan.bean;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Comment {
    private Integer id;

    private Integer valueId;

    private Byte type;

    private String content;

    private Integer userId;

    public Comment(Integer valueId, Byte type, String content, Integer userId, Boolean hasPicture, String[] picUrls, Short star, Date addTime, Date updateTime, Boolean deleted) {
        this.valueId = valueId;
        this.type = type;
        this.content = content;
        this.userId = userId;
        this.hasPicture = hasPicture;
        this.picUrls = picUrls;
        this.star = star;
        this.addTime = addTime;
        this.updateTime = updateTime;
        this.deleted = deleted;
    }

    private Boolean hasPicture;

    private String[] picUrls;

    private Short star;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date addTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    private Boolean deleted;
}
